package com.jz.netthings.engine;

import com.jy.faceValidate.utils.FaceValidateBase;
import com.jy.faceValidate.utils.FaceValidateUtils;
import com.jz.netthings.netty.server.NettyServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@EnableAspectJAutoProxy
@EnableCaching
@EnableScheduling
//@ServletComponentScan //项目启动自动扫描Servlet组件
@ComponentScan(basePackages = {"com.jz.netthings.**"})
public class NetthingsEngineApplication implements CommandLineRunner {

    @Autowired
    NettyServer nettyServer;
//    private static FaceValidateBase f = FaceValidateUtils.faceV;//主要就是预加载人脸识别模块

    public static void main(String[] args) {
        SpringApplication.run(NetthingsEngineApplication.class);
    }

    @Override
    public void run(String... strings) throws Exception {
        nettyServer.run();
    }
}
